package com.kid.keep.dao.message;

import com.kid.keep.bo.MessageBO;
import com.kid.keep.po.Message;

import java.util.List;

/**
 * @Description Message dao
 * @Author JOHN
 * @Create 2020-01-02
 * @Since 1.0.0
 */
@SuppressWarnings("all")
public interface IMessageRepository {

  Integer countByTypeAndStatusAndCreatorId(Integer type,Integer status,Long creatorId);

  Integer countByTypeAndCreatorId(Integer type,Long creatorId);
  Integer countByStatusAndCreatorId(Integer status,Long creatorId);

  List<MessageBO> findByTypeAndStatusAndCreatorId(Integer type, Integer status, Long creatorId);

  int updateStatusByIdAndCreatorId(Message message,Long id ,Long creatorId);
  int updateAllStatusByStatusAndCreatorId(Message message,Integer status ,Long creatorId);
}
